﻿$(document).ready(function() {
    $("#dropline li.current").children("ul").css("left", "0px").show();
    $("#dropline li.current").children(":first-child").css("color", "#ff0000");
    $("#dropline li").hover(function() {
        if (this.className.indexOf("current") == -1) {
            getCurrent = $(this).parent().children("li.current:eq(0)");
            if (this.className.indexOf("top") != -1) {
                $(this).children("a:eq(0)").css("color", "#48555d");
            }
            else {
                $(this).children("a:eq(0)").css("color", "#ff0000");
            }
            if (getCurrent = 1) {
                $(this).parent().children("li.current:eq(0)").children("ul").hide(); 
            }
            $(this).children("ul:eq(0)").css("left", "0px").show();
        }
    }
    , function() {

        if (this.className.indexOf("current") == -1) {
            getCurrent = $(this).parent().children("li.current:eq(0)");
            if (this.className.indexOf("top") != 1) {
                $(this).children("a:eq(0)").css("color", "#48555d");
            }
            else {
                $(this).children("a:eq(0)").css("color", "#48555d");
            }
            $(this).children("ul:eq(0)").css("left", "-99999px").hide();
            if (getCurrent = 1) {
                $(this).parent().children("li.current:eq(0)").children("ul").show();
            }
            else {
                $("#dropline li.current").children("ul").css("left", "0px").show();
            }
        }
    });
});
